<%@ page import="java.io.*,java.util.*,java.net.*,java.sql.*" %>
<%@ page import = "conexion.*" %>
<% conexion con = new conexion();
    usuario us = new usuario();%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/Inicio.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Analisis y Dise&ntilde;o de Sistemas 2</title>
<!-- InstanceEndEditable -->
<link rel="stylesheet" type="text/css" href="style.css" />
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
<body>
<div id="wrap">

       <div class="header">
       		<div class="logo"><br/></div>            
        <div id="menu">
            <ul>                                                                       
            <li><a href="index.jsp">Inicio</a></li>
            <li><a href="login.jsp">Login</a></li>
            <li class="selected"><a href="registro.jsp">Registro</a></li>
            <li><a href="contact.html">Contactanos</a></li>
            </ul>
        </div>     
            
            
       </div> 
       
       
       <div class="center_content"><!-- InstanceBeginEditable name="Centro" -->
         <div class="left_content">
           <div class="title"><span class="title_icon"><img src="images/bullet1.gif" alt="" title="" /></span>Busqueda de articulos</div>
           <div class="feat_prod_box_details">
             <p class="details"> Llenar formulario, debe ingresar al menos un campo para la realizar la busqueda.</p>
             <div class="contact_form">
               <div class="form_subtitle">Buscar Articulo</div>
               <form action="busqueda.jsp" method="post" name="form1" id="form1">
                 <table align="center">
                   <tr valign="baseline">
                     <td nowrap="nowrap" align="right"><strong>Nombre del articulo:</strong></td>
                     <td><input type="text" name="nombre" value="" size="32" /></td>
                   </tr>
                   <tr valign="baseline">
                     <td nowrap="nowrap" align="right"><strong>Autor:</strong></td>
                     <td><input type="text" name="autor" value="" size="32" /></td>
                   </tr>
                   <tr valign="baseline">
                     <td nowrap="nowrap" align="right"><strong>Tema</strong></td>
                     <td><input type="text" name="tema" value="" size="32" /></td>
                   </tr>
                     <td nowrap="nowrap" align="right"></td>
                     <td>
                    </tr>
                     <tr valign="baseline">
                     <td nowrap="nowrap" align="right">&nbsp;</td>
                     <td><input type="submit" name="buscar" value="Aceptar" /></td>
                   </tr>
                 </table>                 
               </form>
               <table border="0" cellpadding="5" cellspacing="0" width="100%" class="datatable">
	<tr>
		<th align="center">&nbsp;Mis Cursos</th>
		<th align="center">&nbsp</th>


        </tr>
<%
   if(request.getParameter("buscar") != null){

     String articulo = request.getParameter("nombre");
    ArrayList<String> articles = con.getArticulos(articulo, "", ""); 
   int cont=0;
     while(cont < articles.size())
     {
         out.println("<tr><td>"+cont.toString()+"</td><td>"articles.get(cont)"</td></tr>");
     }
   
}

%>
</table>
               
               <p>&nbsp;</p>
             </div>
           </div>
           <div class="clear"></div>
         </div>
       <!-- InstanceEndEditable --><!--end of left content--><!-- InstanceBeginEditable name="Derecha" -->
       <div class="right_content">
         <div class="title"><span class="title_icon"><img src="images/bullet3.gif" alt="" title="" /></span>About Our Store</div>
         <div class="about">
           <p> <img src="images/about.gif" alt="" title="" class="right" /> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud. </p>
         </div>
       </div>
       <!-- InstanceEndEditable --><!--end of right content-->
        
        
       
       
       <div class="clear"></div>
       </div><!--end of center content-->
       
              
       <div class="footer">
       	<div class="left_footer"><img src="images/footer_logo.gif" alt="" title="" /></div></div></div>

</body>
<!-- InstanceEnd --></html>